﻿package mortal.game.resource.info.item
{
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class ItemGiftBagInfo extends ItemInfo
    {
        public var itemList1:String;
        public var itemList2:String;
        public var levelMax:String;
        public var assemble:String;
        public var levelMin:String;
        public var dropTime:String;
        public var giftType:int;
        public var set:int;
        public var worldLevelMin:int;

        public function ItemGiftBagInfo()
        {
            return;
        }// end function

        override public function clone() : ItemInfo
        {
            var _loc_1:* = new ItemGiftBagInfo();
            ClassTypesUtil.copyClassValue(_loc_1, this, false);
            return _loc_1;
        }// end function

        public function get itemList() : String
        {
            var _loc_4:int = 0;
            var _loc_5:Array = null;
            var _loc_6:ItemGiftBagInfo = null;
            var _loc_1:String = "";
            var _loc_2:ItemGiftBagInfo = this;
            if (this.set > 0)
            {
                _loc_4 = Cache.instance.role.roleInfo.level;
                _loc_5 = ItemConfig.instance.itemGiftSetDic[(this as ItemGiftBagInfo).set];
                for each (_loc_6 in _loc_5)
                {
                    
                    if (_loc_4 >= int(_loc_6.levelMin) && _loc_4 <= int(_loc_6.levelMax))
                    {
                        _loc_2 = _loc_6;
                        break;
                    }
                }
            }
            var _loc_3:* = _loc_2.itemList2 ? ("&" + _loc_2.itemList2) : ("");
            var _loc_7:* = _loc_2.itemList1 + _loc_3;
            _loc_1 = _loc_2.itemList1 + _loc_3;
            return _loc_7;
        }// end function

    }
}
